Imports System.IO
Public Class FolderBrowserDemo

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then        
            ListFile(FolderBrowserDialog1.SelectedPath)
        End If

    End Sub
    Private Sub ListFile(ByVal strPath As String)
        Try
            lvData.Items.Clear()
            Dim dir As New DirectoryInfo(strPath)
            lvData.Columns.Add("Name", 100, 0)
            lvData.Columns.Add("Size", 50, 0)
            lvData.Columns.Add("Date", 70, 0)
            lvData.View = View.Details
            Dim item1 As ListViewItem
            For Each d As FileInfo In dir.GetFiles("*.*")
                item1 = New ListViewItem(d.Name)
                item1.SubItems.Add(d.Length.ToString())
                    item1.SubItems.Add(d.CreationTime.ToLongDateString())
                lvData.Items.Add(item1)
            Next
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

End Class
